<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <!-- 引入ElementUI样式 -->
  <link rel="stylesheet" href="ElementUI/index.css">
  <script src="ElementUI/vue.js"></script>
  <!-- 引入ElementUI组件库 -->
  <script src="ElementUI/index.js"></script>
</head>
<body>
<div id="app">
<template>
  <el-button type="text" @click="open">点击打开 Message Box</el-button>
</template>
</div>
</body>
</html>
<script>
  new Vue({
    el:'#app',
    methods: {
      open() {
        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning',
          center: true
        }).then(() => {
          this.$message({
            type: 'success',
            message: '删除成功!'
          });
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
        });
      }
    }
  });
</script>